package com.dayfly.tip.model;

import java.util.HashMap;
import java.util.Map;

/**
 * common use result
 * 
 * @author dayfly
 * 
 */
public class CommonResult implements Result {

	/**
	 * success
	 */
	private boolean isSuccess;

	/**
	 * contain the return value
	 */
	private Map<String, Object> conMap = new HashMap<String, Object>();

	/**
	 * contain the error Message
	 */
	private String message;

	public CommonResult(boolean isSuccess) {
		this.isSuccess = isSuccess;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public boolean isSuccess() {
		return isSuccess;
	}

	public Map<String, Object> getConMap() {
		return conMap;
	}

	public void setConMap(Map<String, Object> conMap) {
		this.conMap = conMap;
	}

	public void setSuccess(boolean isSuccess) {
		this.isSuccess = isSuccess;
	}

	@Override
	public void put(String key, Object value) {
		conMap.put(key, value);
	}

	@Override
	public Object get(String key) {
		return conMap.get(key);
	}

}
